import request from "@/utils/request";

// 图像亮度增强
export function enhanceImage(data) {
    return request({
        url: '/model/enhanceImage',
        method: 'post',
        data: data
    })
}

// 获取左右眼热力图
export function makeGradCam(data) {
    return request({
        url: '/model/makeGradCam',
        method: 'post',
        data: data
    })
}

// 获取模型预测疾病概率
export function getProbList(data) {
    return request({
        url: '/model/getProbList',
        method: 'post',
        data: data
    })
}

// 获取所有权重
export function getAllWeights() {
    return request({
        url: '/model/getAllWeight',
        method: 'get'
    })
}

// 获取默认配置
export function getDefaultConfig() {
    return request({
        url: '/model/getDefaultConfig',
        method: 'get'
    })
}

// 保存并使用配置
export function saveAndUseConfig(weightName, learningRate, epoch, threshold) {
    return request({
        url: `/model/saveConfig?weightName=${weightName}&learningRate=${learningRate}&epoch=${epoch}&threshold=${threshold}`,
        method: 'post',
    })
}